
;;自动平衡窗口边距
(use-package olivetti
  :ensure t
  :init
  (setq olivetti-body-width nil)
  :config
  (defun distraction-free ()
    "Distraction-free writing environment"
    (interactive)
    (if (equal olivetti-mode nil)
        (olivetti-mode t)
      (progn
        (olivetti-mode 0))))
  :bind
  (("<f9>" . distraction-free))
)

;; pdf
(use-package pdf-tools
  :ensure t
  :demand t
  :init
  (progn
    (setq-default pdf-view-display-size 'fit-page))
  :config
  (pdf-tools-install-noverify)
;  (define-key pdf-annot-minor-mode-map (kbd "C-c C-y") 'youdao-dictionary-search-async)
)

(use-package nov
  :ensure t
  :demand t)

(use-package org-noter
  :ensure t
  :demand t
  :init
  (setq-default org-noter-always-create-frame nil)
)

(use-package saveplace-pdf-view
  :demand t
  :after pdf-tools
  :ensure t)

(provide 'init-reading)